﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Administrador.Master" AutoEventWireup="true" CodeBehind="UI_PublishModule.aspx.cs" Inherits="Espam.Idiomas.Decimo.Tesis.Web.UI_PublishModule" EnableViewState="true" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="Contenido" runat="server">
    <script type="text/javascript">
        window.onload = function () {
            var seconds = 3;
            setTimeout(function () {
                document.getElementById("<%=lblvalida.ClientID %>").style.display = "none";
            }, seconds * 1000);
        };
    </script>
    <cc1:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
    </cc1:ToolkitScriptManager>
    <div id="page-wrapper">

        <div class="page-content">
            <div class="row">
                <div class="col-lg-12">
                    <div class="page-title">
                        <h1>M&oacute;dulos
                                <small>Publicar M&oacute;dulo</small>
                        </h1>
                        <ol class="breadcrumb">
                            <li class="active">
                                <asp:Label ID="lblvalida" runat="server" Text=""></asp:Label></li>
                            <li class="pull-right">
                                <div id="reportrange" class="btn btn-green btn-square date-picker">
                                    <i class="fa fa-calendar"></i>
                                    <span class="date-range"></span><i class="fa fa-caret-down"></i>
                                </div>
                            </li>
                        </ol>
                    </div>
                </div>
                <!-- /.col-lg-12 -->
            </div>
        </div>
        <div class="row">
            <!-- Validation Examples -->
            <div class="col-lg-12">
                <div class="portlet portlet-default">
                    <div class="portlet-heading">
                        <div class="portlet-title">
                            <h4>Datos Módulos a Publicar</h4>
                        </div>
                        <div class="portlet-widgets">
                            <a data-toggle="collapse" data-parent="#accordion" href="#validationExamples"><i class="fa fa-chevron-down"></i></a>
                        </div>
                        <div class="clearfix"></div>
                    </div>
                    <div id="validationExamples" class="panel-collapse collapse in">
                        <div class="portlet-body">
                            <div class="portlet-body">
                                <div class="table-responsive">
                                    <div runat="server" id="idMensajePublicar" visible="false">
                                        <h1 align="center">
                                            <asp:Label ID="lblMensajeErrorPublicar" runat="server" Text=""></asp:Label></h1>
                                    </div>
                                    <table class="table" runat="server" id="tablaPublicar">
                                        <thead>
                                            <tr>
                                                <td>Ciclo:</td>
                                                <td>
                                                    <asp:Label ID="lblCiclo" runat="server" Text="Ciclo" CssClass="form-control"></asp:Label></td>
                                                <td>Tipo Módulo:</td>
                                                <td>
                                                    <asp:DropDownList ID="ddlTipoModulo" runat="server" CssClass="form-control" EnableViewState="true" AutoPostBack="true" OnSelectedIndexChanged="ddlTipoModulo_SelectedIndexChanged"></asp:DropDownList>
                                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator7" runat="server" ErrorMessage="Campo Obligatorio" ControlToValidate="ddlTipoModulo" ForeColor="Red"></asp:RequiredFieldValidator>
                                                </td>
                                            </tr>
                                        </thead>
                                        <tbody>
                                            <tr id="tipoModulo">
                                                <td>Nivel:</td>
                                                <td>
                                                    <asp:DropDownList ID="ddlNivel" runat="server" CssClass="form-control" OnSelectedIndexChanged="ddlNivel_SelectedIndexChanged"></asp:DropDownList>
                                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ErrorMessage="Campo Obligatorio" ControlToValidate="ddlNivel" ForeColor="Red"></asp:RequiredFieldValidator>
                                                </td>
                                                <td></td>
                                                <td></td>
                                            </tr>
                                            <tr runat="server" id="fila1">
                                                <td>fecha Inicio:</td>
                                                <td>
                                                    <asp:TextBox ID="txtFechaInicio" placeholder="aaaa/mm/dd" autocomplete="off" runat="server" CssClass="form-control" ValidationGroup="modulo"></asp:TextBox>
                                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ErrorMessage="Campo Obligarotio" ControlToValidate="txtFechaInicio" ForeColor="Red"></asp:RequiredFieldValidator>
                                                    <cc1:CalendarExtender PopupButtonID="fInicio" TargetControlID="txtFechaInicio" runat="server" ID="CalendarFechaInicio" Format="yyyy/MM/dd">
                                                    </cc1:CalendarExtender>
                                                    <cc1:FilteredTextBoxExtender ID="FilteredTextBoxExtender3" runat="server" FilterType="Numbers, Custom" ValidChars="/" TargetControlID="txtFechaInicio"></cc1:FilteredTextBoxExtender>
                                                </td>
                                                <td>Fecha Fin:</td>
                                                <td>
                                                    <asp:TextBox ID="txtFechaFin" placeholder="aaaa/mm/dd" autocomplete="off" runat="server" CssClass="form-control" ValidationGroup="modulo"></asp:TextBox>
                                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ErrorMessage="Campo Obligarotio" ControlToValidate="txtFechaFin" ForeColor="Red"></asp:RequiredFieldValidator>

                                                    <cc1:CalendarExtender PopupButtonID="fFin" TargetControlID="txtFechaFin" runat="server" Format="yyyy/MM/dd"></cc1:CalendarExtender>
                                                </td>
                                            </tr>
                                            <tr runat="server" id="fila2">
                                                <td>Hora Inicio:</td>
                                                <td>
                                                    <asp:TextBox ID="txtHoraInicio" autocomplete="off" runat="server" CssClass="form-control" placeholder="ej. 12:00:00" Style="text-transform: uppercase" MaxLength="8"></asp:TextBox>
                                                    <cc1:FilteredTextBoxExtender ID="FilteredTextBoxExtender1" runat="server" TargetControlID="txtHoraInicio" FilterType="Numbers,Custom" ValidChars=":"></cc1:FilteredTextBoxExtender>
                                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="Campo Obligatorio" ControlToValidate="txtHoraInicio" ForeColor="Red" ToolTip="Ingrese el numero de ciclo"></asp:RequiredFieldValidator>
                                                </td>
                                                <td>Hora Fin:</td>
                                                <td>
                                                    <asp:TextBox ID="txtHoraFin" autocomplete="off" runat="server" CssClass="form-control" placeholder="ej. 01:00:00" ValidationGroup="modulo" Style="text-transform: uppercase" MaxLength="8"></asp:TextBox>
                                                    <cc1:FilteredTextBoxExtender ID="FilteredTextBoxExtender2" runat="server" FilterType="Numbers, Custom" ValidChars=":" TargetControlID="txtHoraFin"></cc1:FilteredTextBoxExtender>
                                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ErrorMessage="Campo Obligatorio" ControlToValidate="txtHoraFin" ForeColor="Red"></asp:RequiredFieldValidator>
                                                </td>
                                            </tr>
                                            <tr runat="server" id="fila3">
                                                <td>Cupos</td>
                                                <td>
                                                    <asp:TextBox ID="txtCupos" CssClass="form-control" runat="server"></asp:TextBox>
                                                    <cc1:FilteredTextBoxExtender ID="FilteredTextBoxExtender4" runat="server" TargetControlID="txtCupos" FilterType="Numbers"></cc1:FilteredTextBoxExtender>
                                                    <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" ErrorMessage="Campo Obligatorio" ControlToValidate="txtCupos"></asp:RequiredFieldValidator>
                                                </td>
                                                <td>
                                                    <asp:Button ID="btnCancelar" runat="server" Text="Cancelar" Visible="false" CssClass="btn btn-block" OnClick="btnCancelar_Click" /></td>
                                                <td>
                                                    <asp:Button ID="btnPublicarModulo" runat="server" Text="Publicar Módulo" CssClass="btn btn-dark-blue" OnClick="btnPublicarModulo_Click" /></td>
                                            </tr>
                                        </tbody>
                                    </table>
                                </div>
                            </div>
                        </div>
                </div>
            </div>
        </div>

    </div>
    <!-- /.row -->
    <div class="row">
        <!-- Validation Examples -->
        <div class="col-lg-12">
            <div class="portlet portlet-default">
                <div class="portlet-heading">
                    <div class="portlet-title">
                        <h4>Módulos A Publicar</h4>
                    </div>
                    <div class="clearfix"></div>
                </div>
                <div id="Div1" class="panel-collapse collapse in">
                    <div class="portlet-body">

                        <div class="portlet-body">

                            <div class="table-responsive">
                                <div runat="server" id="divMensajeError" visible="false">
                                    <h1 align="center">
                                        <asp:Label ID="lblMensaje" runat="server" Text=""></asp:Label></h1>
                                </div>
                                <table class="table">

                                    <asp:GridView ID="gvModulos" Width="100%" runat="server"
                                        AutoGenerateColumns="False" CellPadding="4" GridLines="Horizontal" DataKeyNames="idModulo"
                                        BackColor="White" BorderColor="#336666"
                                        BorderStyle="Double" BorderWidth="3px">
                                        <Columns>
                                            <asp:BoundField DataField="horario" HeaderText="HORARIO">
                                                <HeaderStyle HorizontalAlign="Center" />
                                            </asp:BoundField>
                                            <asp:BoundField DataField="codigo" HeaderText="CODIGO">
                                                <HeaderStyle HorizontalAlign="Center" />
                                            </asp:BoundField>
                                            <asp:BoundField DataField="ubicacion" HeaderText="UBICACION">
                                                <HeaderStyle HorizontalAlign="Center" />
                                            </asp:BoundField>
                                            <asp:BoundField DataField="docente" HeaderText="DOCENTE">
                                                <HeaderStyle HorizontalAlign="Center" />
                                            </asp:BoundField>
                                        </Columns>
                                        <FooterStyle BackColor="White" ForeColor="#333333" />
                                        <HeaderStyle BackColor="#336666" Font-Bold="True" ForeColor="White" />
                                        <PagerStyle BackColor="#336666" ForeColor="White" HorizontalAlign="Center" />
                                        <RowStyle BackColor="White" ForeColor="#333333" />
                                        <SelectedRowStyle BackColor="#339966" Font-Bold="True" ForeColor="White" />
                                        <SortedAscendingCellStyle BackColor="#F7F7F7" />
                                        <SortedAscendingHeaderStyle BackColor="#487575" />
                                        <SortedDescendingCellStyle BackColor="#E5E5E5" />
                                        <SortedDescendingHeaderStyle BackColor="#275353" />
                                    </asp:GridView>
                                </table>
                            </div>
                        </div>

                    </div>
                </div>
            </div>
        </div>
    </div>  
    </div>
</asp:Content>
